import java.io.File;
import java.io.PrintWriter;
import java.util.Scanner;


public class Monthly extends Appointment {
	//private int day;
	
	public Monthly(){
    	super();
    	
    }
    public Monthly(String descrip, int timeVar, Date dateVar){
    	super(descrip,timeVar,dateVar);
    	
    	
    }
    /*
	public int getDay() {
		return day;
	}
	public void setDay(int day) {
		this.day = day;
	}
*/
	@Override
	public boolean occursOn(int year, String month, int day, String weekDay) {
		// TODO Auto-generated method stub
		if(date.getDay() == day){
			return true;
		}else{
		return false;
		}
		

	}
	@Override
	public void displayAppointment() {
		// TODO Auto-generated method stub
		System.out.println("************************************");
		System.out.println("Monthly Appointment");
		System.out.println("Description: "+ description);
		System.out.println("Time: " + time);
		System.out.println("Day of the month: " + date.getDay());
		
	}
	@Override
	public Monthly loadAppData(Scanner inStream) {
		// TODO Auto-generated method stub
		int day;
		
		description = inStream.nextLine();
		time = inStream.nextInt();
		day = inStream.nextInt();
		
		
		this.date.setDay(day);
		return this;
	}
	@Override
	public void saveAppData(PrintWriter output) {
		// TODO Auto-generated method stub
		output.println("Monthly");
		output.println(description);
		output.println(time);
		output.println(date.getDay());
	}

	
}